package com.eastfair.home.api;

import com.eastfair.core.base.R;
import com.eastfair.home.dto.ReportSpaceAuditDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 报馆审核 Feign.
 *
 * @author dqq
 * @date 2022 /8/9
 */
@FeignClient(value = "home/reportSpaceAudit")
public interface ReportSpaceAuditFeign {

    /**
     * 提交报馆审核.
     *
     * @param reportSpaceAuditDTO the report space audit dto
     * @return the r
     */
    @PostMapping("/submit")
    R<Boolean> submitReportSpaceAudit(@RequestBody ReportSpaceAuditDTO reportSpaceAuditDTO);

    /**
     * 取消申请.
     *
     * @param reportSpaceId the report space id
     * @return the boolean
     */
    @PostMapping("/cancel/submit/{reportSpaceId}")
    R<Boolean> cancelSubmit(@PathVariable("reportSpaceId") Long reportSpaceId);

    /**
     * 发送配置收款商户的站内信.
     *
     * @param orderType           the order type
     * @param reportSpaceAuditDTO the report space audit dto
     * @return the r
     */
    @PostMapping("/send/config/payee/innerMsg")
    R<Boolean> sendConfigPayeeInnerMsg(@RequestParam("orderType") String orderType, @RequestBody ReportSpaceAuditDTO reportSpaceAuditDTO);
}